//
//  TeamTableViewCell.m
//  ShouYi
//
//  Created by yurui on 16/3/11.
//  Copyright © 2016年 yurui. All rights reserved.
//

#import "TeamTableViewCell.h"

@implementation TeamTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.view  = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kWidth, 62)];
        _view.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:_view];
        
        self.imageview = [[UIImageView alloc]initWithFrame:CGRectMake(15, 10   , 40 , 40)];
        self.imageView.backgroundColor = [UIColor grayColor];
        self.imageView.layer.cornerRadius = 20;
        self.imageView.layer.masksToBounds = YES;
        self.imageView.backgroundColor = [UIColor redColor];
        [self.view addSubview:self.imageview];
        
        self.niceName = [[UILabel alloc]initWithFrame:CGRectMake(70, 5, 100, 15)];
        self.niceName.textColor = [UIColor grayColor];
        self.niceName.font = [UIFont systemFontOfSize:12];
        [self.view addSubview:_niceName];
        
        self.time = [[UILabel alloc]initWithFrame:CGRectMake(70, 22, 100, 13)];
        self.time.textColor = [UIColor grayColor];
        self.time.font = [UIFont systemFontOfSize:11];
        [self.view addSubview:_time];
        
        self.inviter = [[UILabel alloc]initWithFrame:CGRectMake(70, 40, 100, 15)];
        self.inviter.textColor = [UIColor grayColor];
        self.inviter.font = [UIFont systemFontOfSize:12];
        [self.view addSubview:_inviter];
        
        self.teamNum = [[UILabel alloc]initWithFrame:CGRectMake(kWidth - 95, 22, 80, 13)];
        self.teamNum.textAlignment = NSTextAlignmentRight;
        self.teamNum.textColor = [UIColor grayColor];
        self.teamNum.font = [UIFont systemFontOfSize:11];
        [self.view addSubview:_teamNum];
        
        self.expend = [[UILabel alloc]initWithFrame:CGRectMake(kWidth - 100, 40, 50, 15)];
        self.expend.textColor = [UIColor grayColor];
        self.expend.font = [UIFont systemFontOfSize:12];
        [self.view addSubview:_expend];
        
        self.money = [[UILabel alloc]initWithFrame:CGRectMake(kWidth - 50 , 40, 35, 15)];
        self.money.textColor = [UIColor redColor];
        self.money.textAlignment = NSTextAlignmentRight;
        self.money.font = [UIFont systemFontOfSize:12];
        [self.view addSubview:_money];
        
    }
    return self;
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
